import java.util.Locale;
import java.util.Scanner;

//判断字符串是否是回文数，（把大写转小写后，去掉特殊字符只留数字和字符，从前到后和从后到前读都一样）
public class test {
    public  boolean isPalindrome(String s){
        s=s.toLowerCase();
        int left=0;
        int right=s.length()-1;
        while(left<right){
            while (left<right&&!isCharacterNum(s.charAt(left))){
                left++;
            }
            while (left<right&&!isCharacterNum(s.charAt(right))){
                right--;

            }
            if(s.charAt(left)==s.charAt(right)){
                left++;
                right--;
            }else {
                return  false;
            }
        }
        return true;
    }




    private boolean isCharacterNum(char ch){
        if(Character.isDigit(ch)||Character.isLetter(ch)){
            return false;
        }
        return  true;
    }



    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String input = sc. next();
        test t=new test();
        boolean result=t.isPalindrome(input);
        if(result){
            System.out.println("输入的字符串是回文");
        }else {
            System.out.println("输入的字符串不是回文");
        }
        sc.close();
}
    }